html,body {
    height: 100%;
}
body {
    background: url(../img/bg.jpg) 50% 50% no-repeat;
    background-size: cover;
    perspective:120px;
}
.rotating-plane {
    display: none;
    width: 80px;
    height: 80px;
    background: #fff;
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -40px;
    margin-top: -40px;
    // 使用动画
    animation: rotating-plane 2s infinite;
    &.active {
        display: block;
    }
}
.login {
    width: 350px;
    height: 450px;
    background: #fff;
    box-shadow: 0px 0px 5px #333;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
    padding: 90px 40px;

    &.effect {
        //添加动态效果
        animation: login-small 0.8s linear;
        animation-fill-mode: forwards;
    }
    h3 {
        font-size: 24px;
        margin-bottom: 50px;
    }
    .log-form {
        li {
            position: relative;
            width: 100%;
            height: 40px;
            display: flex;
            align-items: center;
            margin-bottom: 20px;
            input {
                height: 30px;
                border:0px;
                border-bottom: 1px solid #ccc;
                flex-grow: 1;
                padding-left: 10px;
                //注意：outline不加focus样式不起作用
                outline:none; 
                // outline:#00FF00 dotted 1px;
                &:focus {
                    border: 1px solid dodgerblue;

                    &~label{
                        opacity: 1;
                        top: -5px;
                    }
                }
            }
          
            label { 
                position: absolute;
                left: 50px;
                top: 21px;
                color:dodgerblue;;
                font-size: 14px;
                opacity: 0;
                background: #fff;
                padding: 0 5px;
                transition: 0.5s;
             }
            i {
                width: 20px;
                height: 20px;
                display: inline-block;
                background: red;
                margin-right: 18px;
                &.name {
                    background: url(../img/name.png) no-repeat;
                    background-size: 20px 20px;
                }
                &.password {
                    background: url(../img/password.png) no-repeat;
                    background-size: 20px 20px;
                }
            }
           
        }
    }

    .login-button {
        cursor: pointer;
        text-align: center;
        height: 40px;
        line-height: 40px;
        background: dodgerblue;
        color: #fff;
        border-radius: 5px;
    }
}


//定义动画
@keyframes login-small {
    0% {
        // 位移 translate， 放大缩小 scale: ;
        transform: translate(-50%,-50%) scale(1) ;
    }
    100% {
        transform: translate(-50%,-50%) scale(0.2) ;
    }
}

@keyframes rotating-plane {
    0%{
        transform: rotateX(0deg) rotateY(0);
    }
    50% {
        transform:rotateX(-180deg) rotateY(0);
    }
    100% {
        transform: rotateX(-180deg) rotateY(180deg);
    }
}